<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>返回一个iframe中的longdesc属性的值</title>
</head>

<body>
    <iframe id="myframe" src="https://www.runoob.com/w3cnote" longdesc="w3s.txt">
        <p>你的浏览器不支持iframes.</p>
    </iframe>
    <p>图像描述信息页面的 URL:
        <script>
            document.write(document.getElementById("myframe").longDesc);
        </script>
    <p>
</body>

</html>